package Bank;
public class BankAccount {
    private double balance;
    private int depositsCount;
    private int withdrawalsCount;
    private String accountNumber;

    

    public BankAccount(double balance, String accountNumber) {
        this.balance = balance;
        this.accountNumber = accountNumber;
        this.depositsCount = 0;

        this.withdrawalsCount = 0;
    }


    public void deposit(double amount) {
        if(amount <= 0){
            System.out.println("Deposit amount is not positive");
        } else {
            balance += amount;
            depositsCount++;
        }
        
    }


    public void withdraw(double amount) {
        if (amount <= 25.00){
            System.out.println("withdraw amount is not positive");
            return;
        }
        if (amount > balance){
            System.out.println("Insufficient funds. Current balance:" + balance);
            return;
        }
        balance -= amount;
    }

    

    


    public void displayAccountDetails() {
        System.out.println("Balance: RMB " + balance);
        System.out.println("Deposits this month: " + depositsCount);
        System.out.println("Withdrawals this month: " + withdrawalsCount);
    }
    
    public double getBalance(){
        return this.balance;
    }
    
    public int getDepositsCount() {
        return depositsCount;
    }

    public int getWithdrawalsCount() {
        return withdrawalsCount;
    }
}
